from rest_framework import serializers
from coder.models import Coder


class CoderSerializer(serializers.ModelSerializer):
    owner = serializers.ReadOnlyField(source='owner.username')

    class Meta:
        model = Coder
        fields = ['name', 'password', 'owner']


